//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { SensitiveWord, SensitiveWordResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooSensitiveWordList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<SensitiveWordResponse>(`/uctoo/sensitive_word/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooSensitiveWord = async (id: string) => {
  return requestClient.get<SensitiveWord>(`/uctoo/sensitive_word/${id}`);
};

export const adductooSensitiveWord = async (data: Partial<SensitiveWord>) => {
  return requestClient.post<SensitiveWord>('/uctoo/sensitive_word/add', data);
};

export const edituctooSensitiveWord = async (data: Partial<SensitiveWord>) => {
  return requestClient.post<SensitiveWord>('/uctoo/sensitive_word/edit', data);
};

export const deleteuctooSensitiveWord = async (id: string) => {
  return requestClient.post<any>('/uctoo/sensitive_word/del', { id });
};
